home *** CD-ROM | disk | FTP | other *** search
/ CD School House 9 / CD School House 9.0 - Wayzata Technology (1994).iso / pc / dos / math / _100b / _.doc next >
Text File  |  1992-08-27  |  9KB  |  231 lines

  1. ┌─────────────────────────────────────────────────────────────────────────────┐
  2. │                           # Version 1.00ß                                   │
  3. └─────────────────────────────────────────────────────────────────────────────┘
  4.  
  5. Purpose
  6. ~~~~~~~
  7.         # ("octothorp", "number sign", or "hash", whichever you prefer)
  8.         is a infix command-line calculator.  Features include
  9.         factorials, defined constant π (pi), scientific notation
  10.         (floating point), hex, decimal, octal, binary input and output
  11.         representations, radian or degree representations of angles,
  12.         bitwise operators, and integer-specific functions mod and div.
  13.  
  14.  
  15. Why did we write this?
  16. ~~~~~~~~~~~~~~~~~~~~~~
  17.         We found other calculators (TSRs, 4dos' %@eval[]) to be
  18.         inadequate and/or cumbersome in many situations.  As a result,
  19.         we decided to write one for ourselves.  Originally it only had
  20.         support for expressions and bitwise operators, but features were
  21.         added to make it more versatile and easy to use.
  22.  
  23.  
  24. Usage
  25. ~~~~~
  26.         Typing "#" and pressing Enter at the command line will result in
  27.         the following screen:
  28.  
  29.  
  30. # Version 1.00ß Copyright 1991 by Amit K. Mathur and Peter Harwood.
  31.  
  32. Usage: # </outputparameters> <expression to evaluate>
  33. Where the expression can contain any of the following:
  34.        '+', '-', '*', '/', '^', and '!' operators
  35.        brackets, nested as deep as you want
  36.        'e' to specify scientific notation
  37.        'pi', specifically 3.14159265358979
  38.        the trig functions 'sin', 'cos', 'tan', and 'atan'
  39.        the logarithmic functions 'exp' and 'ln'
  40.        'sqrt' as an alternative to numeric^0.5
  41.        the Integer only functions 'div' and 'mod'
  42.        the bitwise operators 'not', 'and', 'shl', 'shr',
  43.        'xor', and 'or'
  44.        you can prefix a number with an '$','%','O', or 'D' to
  45.        specify hex, binary, octal or degrees respectively
  46.  
  47.        Output Parameters are 'b' for binary, 'h' for hex,
  48.        'd' for decimal, 'o' for octal or any combination.
  49.  
  50. # can handle values from 3.4e-4932 to 1.1e4932
  51.  
  52.  
  53.         An arithmetic expression typed after the "#" (and a space!) will
  54.         be evaluated and output.
  55.  
  56.     Ex #1. Typing "# 3+4(9)" and pressing Enter will result in the
  57.         following:
  58.  
  59. # Version 1.00ß Copyright 1991 by Amit K. Mathur and Peter Harwood.
  60. Math Co-processor Detected and Utilized.
  61.  
  62. 3+4(9)= 39
  63.  
  64.         Note in this case the lack of the "*" to indicate
  65.         multiplication.  It is actually optional in this case.  Note
  66.         also that on a computer with no math co-processor, a message of
  67.         "No Math Co-Processor Found, Emulation Used." will instead
  68.         result.
  69.  
  70.     Ex #2. Typing "# /bo %011011011 shl 2 xor ($34 and (o707773645 div
  71.         3))" will result in the following:
  72.  
  73. # Version 1.00ß Copyright 1991 by Amit K. Mathur and Peter Harwood.
  74. Math Co-processor Detected and Utilized.
  75.  
  76. %011011011shl2xor($34and(o707773645div3))= 1530 in octal
  77. %011011011shl2xor($34and(o707773645div3))= 1101011000 in binary
  78.  
  79.         The "/bo" indicates your wish to see binary and octal
  80.         representations of the answer. The spaces within the expression
  81.         are filtered out by the parser.
  82.  
  83.     Ex #3.  Typing "# sin(d90)*4!+exp(2)^sqrt(2*tan(pi/4))" will yield:
  84.  
  85. # Version 1.00ß Copyright 1991 by Amit K. Mathur and Peter Harwood.
  86. Math Co-processor Detected and Utilized.
  87.  
  88. sin(d90)*4!+exp(2)^sqrt(2*tan(pi/4))= 40.9188286785579
  89.  
  90.         The "d" in "sin(d90)" indicates that the number following the
  91.         "d" is in degrees. (It is converted to radians)
  92.  
  93.  
  94. Notes
  95. ~~~~~
  96.         Brackets can virtually be nested as deeply as you want,
  97.         considering that you will hit the DOS command-line limit before
  98.         you can blow our stack.
  99.  
  100.         In 4dos, users will realize that the carat ("^") is used to
  101.         separate commands.  This conflicts with our exponent function.
  102.         One way around it is to use the 4dos escape character.  This
  103.         character is by default Control-X ("").  Type this character
  104.         before the carat and 4dos will ignore the command separator.
  105.         Another way is to redefine the command separator to something
  106.         else in your 4dos.ini file (or with SETDOS).
  107.  
  108.         Another conflict with 4dos is the percent character ("%") used
  109.         to indicate binary numbers.  4dos tries
  110.  
  111.         Make sure when using the different output formats to put your
  112.         parameters BEFORE the expression.  If you do not, # will think
  113.         it is part of the expression!  Also remember that multiple
  114.         output parameters must be grouped together after the "/", eg.
  115.         "/bdh" for binary, decimal, and hex output.
  116.  
  117.         We decided not to write in support for floating point using
  118.         other bases than ten (decimal).  First of all, there's no real
  119.         reason for it, and second, we couldn't get it working quite
  120.         correctly due to floating point errors in base conversion.
  121.  
  122.         Things like "# and" will work.  The reason for this is that a
  123.         zero is implied after and before the "and", similar to a one
  124.         being implied between brackets.
  125.  
  126.  
  127. License
  128. ~~~~~~~
  129.         # v1.00 is Copyright 1991-1992 by Amit K. Mathur and Peter Harwood,
  130.         Windsor, Ontario, Canada.
  131.  
  132.         You are hereby granted the license to use # for a 21 day
  133.         evaluation period, after which time you are required to register
  134.         # with the authors in order to use it further.
  135.  
  136.         The authors can not accept any damages, direct or indirect, that
  137.         may arise from the use of #.  We have taken every precaution
  138.         to ensure that it is completely bug free.  To the best of our
  139.         knowledge this program is in perfect working order.
  140.  
  141.  
  142. Contacting the Authors
  143. ~~~~~~~~~~~~~~~~~~~~~~
  144.         Should any problems or questions arise about the use of #
  145.         then you can reach the authors any of the following ways:
  146.  
  147.         Through RIME(tm) or RelayNet
  148.                AMIT MATHUR ->WINDSOR (R/O Capable)
  149.  
  150.         Through InterNET
  151.                pkharwood@napier.uwaterloo.ca
  152.  
  153.         Personally
  154.                Amit k. Mathur                   Peter Harwood
  155.                3215 St. Patrick's Drive         2497 Via Vita
  156.                Windsor, Ontario                 Windsor, Ontario
  157.                N9E 3H2 CANADA                   N9E 4C7 CANADA
  158.                (519) 966-6924                   (519) 966-4246
  159.  
  160.  
  161. History of #
  162. ~~~~~~~~~~~~
  163. version 1.00ß
  164.         - Initial release, for testing purposes.
  165.  
  166.  
  167. For the Future
  168. ~~~~~~~~~~~~~~
  169.         - a 4dos-happy version
  170.         - an OS/2 version
  171.         - implement of the gamma function for real-valued factorials (pi!)
  172.         - any suggestions you may have
  173.  
  174.  
  175. Registration Form
  176. ~~~~~~~~~~~~~~~~~
  177. ------------------------------------------------------------------------------
  178.         Complete this form and mail along with your registration fee to:
  179.  
  180.                   Amit K. Mathur
  181.                   3215 St. Patrick's Drive
  182.                   Windsor, Ontario
  183.                   N9E 3H2 CANADA
  184.  
  185.         Name    : _____________________________________________________
  186.  
  187.         Address : _____________________________________________________
  188.  
  189.                   _____________________________________________________
  190.  
  191.         City    : ____________________________________ State : ________
  192.  
  193.         Country : ____________________________________
  194.  
  195.         Zip     : ____________________ Telephone : (_____) ____________
  196.  
  197.         E-Mail  : _____________________________________________________
  198.  
  199.         I would prefer [   ] 5¼" or [   ] 3½" disks.
  200.  
  201.         # v1.00ß Registration ...................................$15.00
  202.         5+ #s (Site License) .............................. Each $10.00
  203.         _______________________________________________________________
  204.  
  205.         Enclosed ......................................... $___________
  206.  
  207.         *** Make Cheques Payable to "Amit K. Mathur" or "Peter Harwood"
  208.  
  209.         Enhancements you would like to see : __________________________
  210.  
  211.         _______________________________________________________________
  212.  
  213.  
  214.         Note that this is a beta version and comments would be MUCH
  215.         appreciated!
  216.  
  217.         Comments : ____________________________________________________
  218.  
  219.         _______________________________________________________________
  220.  
  221.         _______________________________________________________________
  222.  
  223.         _______________________________________________________________
  224.  
  225.  
  226.         Registration is Lifetime - Once you have registered with us
  227.         you will be notified of major upgrades and given the option to
  228.         order them at no extra cost other than Shipping and Handling.
  229.  
  230.         Thank you for your support of the Shareware concept and of #.
  231.